{% comment %}
Copyright 2010 Google Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
{% endcomment %}
{% comment %}
  This is the base template which defines the structure of all pages
  within the person finder application and all common features.
  To override parts of this template, use the 'extends' tag and
  'block' tags to define new content for any blocks defined here.
{% endcomment %}
{% load i18n %}
<!doctype html public "-//W3C//DTD HTML 4.01 Strict//EN">
<html dir="{{env.rtl|yesno:"rtl,ltr"}}">
<head>
  <meta name="keywords" content="{{env.keywords}}">
  <meta http-equiv="content-type" content="text/html; charset={{env.charset}}">
  <meta http-equiv="content-language" content="{{env.lang}}">
  {% if noindex %}
    <meta name="robots" content="noindex">
  {% endif %}
  <link rel="alternate" media="handheld" href="{{env.url}}">
  <title>
    Google Person Finder
  </title>
{% block head %}
  {% if params.small %}
    {% comment %}
      Facebook small interface acts the same as the normal small
      interface, it's just a bit smaller.
    {% endcomment %}
    <link type="text/css" rel="stylesheet" href="/personfinder/static/style-small.css">
    {% ifequal params.style "facebook" %}
    <link type="text/css" rel="stylesheet" href="/personfinder/static/style-facebook.css">
    {% endifequal %}
    {% if env.rtl %}
    <link type="text/css" rel="stylesheet" href="/personfinder/static/style-rtl-small.css">
    {% endif %}
  {% else %}
    <link type="text/css" rel="stylesheet" href="/personfinder/static/style.css">
    {% if env.rtl %}
    <link type="text/css" rel="stylesheet" href="/personfinder/static/style-rtl.css">
    {% endif %}
    <link type="text/css" rel="stylesheet" href="/personfinder/static/googleorg.css">
    {% if env.language_api_key %}
      <script src="https://www.google.com/jsapi?key={{env.language_api_key}}"></script>
      <script type="text/javascript">
        var lang = "{{env.lang}}";
      </script>
    {% endif %}
    <script src="/personfinder/static/forms.js"></script>
  {% endif %}
  {% if env.virtual_keyboard_layout %}
    <script type="text/javascript" src="http://www.google.com/jsapi"></script>
    <script type="text/javascript" src="/personfinder/static/vk.js"></script>
    <script type="text/javascript">
      google.setOnLoadCallback(function() {
        initialize_keyboard('{{env.virtual_keyboard_layout}}');
      });
    </script>
  {% endif %}
{% endblock head %}
</head>

{% block body %}
<body onload="{{onload_function}}">
  {% block header %}
    <div class="header">
      <div class="header-left">
      	  <a href="/personfinder/global/howitworks">
            <img src="/personfinder/static/google-person-finder.gif" width="260" height="40">
          </a>
      </div>
    </div>
  {% endblock header %}

  <div class="container">
    <div class="content">
      <h1>
        {% block heading %}
        Google Person Finder
        {% endblock heading %}
        <br>
        <b>{{env.subdomain_title}}</b>
      </h1>
      {% block content %}{% endblock content %}
    </div>
  </div>

  {% block sidebar %}
  <div class="sidebar">
    {% for instance in env.instances %}
      {% ifequal instance.subdomain env.subdomain %}
        <b>{{instance.title}}</b>
	{% else %}
        <a href="http://{{instance.subdomain}}.googlepersonfinder.appspot.com/">
          {{instance.title}}</a>
      {% endifequal %}
      <br>
    {% endfor %}
    {% if env.instances %}
      <br>
    {% endif %}
    {% block extralinks %}
    <a href="/personfinder/global/howitworks">How it works</a><br>
    <a href="/personfinder/global/faq">Frequently asked questions</a><br>
    <a href="/personfinder/global/responders">For responders</a><br>
    <a href="http://code.google.com/p/googlepersonfinder/">For developers</a>
    {% endblock extralinks %}
  </div>
  {% endblock sidebar %}

  {% block footer-links %}
    <div class="footer">
      &copy; Google &#xb7;
      <a href="http://www.google.org/">Google.org Home</a> &#xb7;
      <a href="http://www.google.com/accounts/TOS">Terms of Service</a>
    </div>
  {% endblock footer-links %}
  {% include "analytics.html" %}
</body>
{% endblock body %}
</html>
